package classes;
import java.util.List;
import com.google.gson.Gson;

public class JSONObject {

    public static void main(String... args) throws Exception {
    	User obj = new User();
    	obj.setFirstName("asaf");
    	obj.setLastName("segev");
    	obj.setMoney("1200");
    	obj.setPassword("anroa");
    	obj.setUserName("segev");
    	Gson gson = new Gson();
    	String json = gson.toJson(obj);
    	User obj2 = gson.fromJson(json, User.class);   
    	System.out.println(obj2);
    }

}


